import { NextResponse } from "next/server"

/**
 * 获取用户资料
 *
 * @route GET /api/user/profile/:userId
 * @param {string} userId - 用户ID
 *
 * @returns {Object} 返回用户资料
 *
 * 请求示例:
 * GET /api/user/profile/123
 *
 * 返回示例:
 * {
 *   "success": true,
 *   "data": {
 *     "id": "123",
 *     "name": "用户名",
 *     "bio": "这个人很懒，什么都没有写~",
 *     "avatar": "/images/user-avatar.jpg",
 *     "cover": "/images/user-cover.jpg",
 *     "stats": {
 *       "followingCount": 32,
 *       "followersCount": 128,
 *       "songsCount": 1,
 *       "playlistsCount": 1,
 *       "albumsCount": 0,
 *       "mvsCount": 1
 *     }
 *   }
 * }
 */
export async function GET(request: Request, { params }: { params: { userId: string } }) {
  const userId = params.userId

  // 实现获取用户资料逻辑
  return NextResponse.json({
    success: true,
    data: {
      id: userId,
      name: "用户名",
      bio: "这个人很懒，什么都没有写~",
      avatar: "/images/user-avatar.jpg",
      cover: "/images/user-cover.jpg",
      stats: {
        followingCount: 32,
        followersCount: 128,
        songsCount: 1,
        playlistsCount: 1,
        albumsCount: 0,
        mvsCount: 1,
      },
    },
  })
}

